﻿<UserControl x:Class="Examples.Controls.ErrorNotificationControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             d:DesignHeight="75.667"
             d:DesignWidth="75.667" MinWidth="75" MinHeight="75" Margin="0">
    <UserControl.Resources>
        <Storyboard x:Name="NotificationStoryboard">
        	<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="LayoutRoot">
        		<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-75">
        			<EasingDoubleKeyFrame.EasingFunction>
        				<BackEase EasingMode="EaseOut"/>
        			</EasingDoubleKeyFrame.EasingFunction>
        		</EasingDoubleKeyFrame>
        	</DoubleAnimationUsingKeyFrames>
        	<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="LayoutRoot">
        		<EasingDoubleKeyFrame KeyTime="0" Value="0.45"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
        	</DoubleAnimationUsingKeyFrames>
        	<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="LayoutRoot">
        		<EasingDoubleKeyFrame KeyTime="0" Value="0.45"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
        	</DoubleAnimationUsingKeyFrames>
        	<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LayoutRoot">
        		<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
        	</DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="CloseNotificationStoryboard">
        	<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="LayoutRoot">
        		<EasingDoubleKeyFrame KeyTime="0" Value="-75">
        			<EasingDoubleKeyFrame.EasingFunction>
        				<BackEase EasingMode="EaseIn"/>
        			</EasingDoubleKeyFrame.EasingFunction>
        		</EasingDoubleKeyFrame>
        		<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0">
        			<EasingDoubleKeyFrame.EasingFunction>
        				<BackEase EasingMode="EaseIn"/>
        			</EasingDoubleKeyFrame.EasingFunction>
        		</EasingDoubleKeyFrame>
        	</DoubleAnimationUsingKeyFrames>
        	<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="LayoutRoot">
        		<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1">
        			<EasingDoubleKeyFrame.EasingFunction>
        				<BackEase EasingMode="EaseIn"/>
        			</EasingDoubleKeyFrame.EasingFunction>
        		</EasingDoubleKeyFrame>
        		<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.45">
        			<EasingDoubleKeyFrame.EasingFunction>
        				<BackEase EasingMode="EaseIn"/>
        			</EasingDoubleKeyFrame.EasingFunction>
        		</EasingDoubleKeyFrame>
        	</DoubleAnimationUsingKeyFrames>
        	<DoubleAnimation Duration="0:0:1" To="0.45" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="LayoutRoot" d:IsOptimized="True">
        		<DoubleAnimation.EasingFunction>
        			<BackEase EasingMode="EaseIn"/>
        		</DoubleAnimation.EasingFunction>
        	</DoubleAnimation>
        	<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LayoutRoot">
        		<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
        	</DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="RefreshNotificationStoryboard" RepeatBehavior="3x">
        	<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="LayoutRoot">
        		<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1.2">
        			<EasingDoubleKeyFrame.EasingFunction>
        				<BackEase EasingMode="EaseInOut"/>
        			</EasingDoubleKeyFrame.EasingFunction>
        		</EasingDoubleKeyFrame>
        		<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1">
        			<EasingDoubleKeyFrame.EasingFunction>
        				<BackEase EasingMode="EaseIn"/>
        			</EasingDoubleKeyFrame.EasingFunction>
        		</EasingDoubleKeyFrame>
        	</DoubleAnimationUsingKeyFrames>
        	<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="LayoutRoot">
        		<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1.2">
        			<EasingDoubleKeyFrame.EasingFunction>
        				<BackEase EasingMode="EaseInOut"/>
        			</EasingDoubleKeyFrame.EasingFunction>
        		</EasingDoubleKeyFrame>
        		<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1">
        			<EasingDoubleKeyFrame.EasingFunction>
        				<BackEase EasingMode="EaseIn"/>
        			</EasingDoubleKeyFrame.EasingFunction>
        		</EasingDoubleKeyFrame>
        	</DoubleAnimationUsingKeyFrames>
        	<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="ellipse">
        		<EasingColorKeyFrame KeyTime="0:0:0.5" Value="#FEFFFFFF"/>
        		<EasingColorKeyFrame KeyTime="0:0:1" Value="#FE000000"/>
        	</ColorAnimationUsingKeyFrames>
        	<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="ellipse1">
        		<EasingColorKeyFrame KeyTime="0:0:0.5" Value="#FEFFFFFF"/>
        		<EasingColorKeyFrame KeyTime="0:0:1" Value="#FE000000"/>
        	</ColorAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>

    <Border x:Name="LayoutRoot"
		RenderTransformOrigin="0.5,0.5" Background="#FFB80303" BorderBrush="Black" BorderThickness="1,1,2,2" CornerRadius="5" MouseLeftButtonUp="LayoutRoot_MouseLeftButtonUp" Margin="10">
    	<Border.OpacityMask>
    		<LinearGradientBrush EndPoint="0.965,0.97" StartPoint="0.33,0.043">
    			<GradientStop Color="#FE000000" Offset="0.606"/>
    			<GradientStop Color="#64FFFFFF"/>
    		</LinearGradientBrush>
    	</Border.OpacityMask>
		<Border.RenderTransform>
			<CompositeTransform />
		</Border.RenderTransform>
		<Grid>
    		<TextBlock x:Name="NumberTextBlock" HorizontalAlignment="Right" VerticalAlignment="Bottom" Foreground="White" Margin="0,0,3,3" FontSize="13.333" />
    		<TextBlock Margin="0" Text="!" FontSize="48" HorizontalAlignment="Center" VerticalAlignment="Center" d:IsHidden="True" />
    		<Ellipse x:Name="ellipse" Fill="#FE000000" Margin="22,5,22,15" Stroke="Black"/>
    		<Ellipse x:Name="ellipse1" Fill="#FE000000" Height="8" Margin="22,0,22,5" Stroke="Black" VerticalAlignment="Bottom"/>
    	</Grid>
	</Border>
</UserControl>
